<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/include/taglib.jsp"%>
<%@ page import="java.sql.*"%>
				<%
						String driverName = "com.mysql.jdbc.Driver"; //Mysql数据库连接
						String userName = "root";
						String psw = "123456"; //本行和上一行是数据库的登录名和密码
						String dbName = "test1"; //数据库名字
						String url = "jdbc:mysql://localhost:3306/test1?serverTimezone=UTC";
						Class.forName("com.mysql.jdbc.Driver");
						Connection conn = DriverManager.getConnection(url, userName, psw);
						Statement stam = conn.createStatement(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${ctx}/layui/css/layui.css">
<link rel="stylesheet" href="${ctx }/css/font_eolqem241z66flxr.css"
	media="all" />
<link rel="stylesheet" href="${ctx }/css/list.css" media="all" />
<script>
	var ctx = "${ctx}";
</script>
</head>
<body class="childrenBody">
	<blockquote class="layui-elem-quote list_search">
		<div class="layui-inline">
			<a class="layui-btn layui-btn-normal parameterAdd_btn"><i
				class="layui-icon">&#xe608;</i> 添加商品参数</a>
		</div>

		<form class="layui-form">
			<div class="layui-inline">
				<div class="layui-input-inline">
					<!-- <input type="text" id="product_name" value="" placeholder="请输入商品名称"
						class="layui-input search_input "> -->
						<select name="product_name" id="product_name"
						class="layui-input search_input"
						lay-search="">
						<option value="">--请选择要关联的商品--</option>
		
						<%
							
							ResultSet rs = stam.executeQuery("SELECT product.product_name,product.product_id FROM product");

							while (rs.next()) //循环输出数据
							{
								out.print("<option value=" + rs.getString("product_name") + ">" + rs.getString("product_name")
										+ "</option>");
							}
							
						%>
					</select>
				</div>


			<!-- 	<div class="layui-input-inline">
					<input type="text" id="product_id" value="" placeholder="请输入商品ID"
						class="layui-input search_input ">
				</div> -->
				<a style="margin-left: 10px" class="layui-btn search_btn"
					lay-submit="" data-type="search" lay-filter="search">查询</a>

			</div>

		</form>

	</blockquote>
	<!-- 数据表格 -->
	<table id="parameterList" class="parameterList" lay-filter="parameterList"></table>
	<script type="text/javascript" src="${ctx }/layui/layui.js"></script>
	<script type="text/javascript" src="${ctx }/js/parameter/parameterList.js"></script>
	<script type="text/html" id="barEdit">
		<a class="layui-btn layui-btn-sm" lay-event="edit">
            <i class="layui-icon">&#xe642;</i>
        </a>
        <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del">
            <i class="layui-icon">&#xe640;</i>
        </a>
    </script>
</body>
</html>